package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.InviteDAO;
import cn.bb.bbstudy.pojo.Invite;
import cn.bb.bbstudy.service.InviteService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class InviteServiceImpl implements InviteService{

    @Resource
    private InviteDAO inviteDAO;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return inviteDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Invite record) {
        return inviteDAO.insert(record);
    }

    @Override
    public int insertSelective(Invite record) {
        return inviteDAO.insertSelective(record);
    }

    @Override
    public Invite selectByPrimaryKey(Integer id) {
        return inviteDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Invite record) {
        return inviteDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Invite record) {
        return inviteDAO.updateByPrimaryKey(record);
    }

    public List<Invite> findAll() {
        return inviteDAO.findAll();
    }
}
